package com.mantbox.channelcall.utils;

import com.mantbox.channelcall.service.UrlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

/*定时服务*/
@Configuration
@EnableScheduling
public class ScheduleTask {

    @Autowired
    UrlService urlService;

    /*每天0点重置点击数*/
    @Scheduled(cron = "0 0 0 * * *")
    void resetUrlClick() {
        urlService.resetClick();
    }

}
